﻿using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;

namespace Silvery.Role.Simple
{
    public class SimpleShadow : BaseObject
    {
        public SimpleShadow()
        {
            //使用代码制作一个影子，这个影子是固定的宽高
            //通常来说可以使用判定图片宽重设影子的方法
            Ellipse ellipse = new Ellipse() { Width = 50, Height = 26 };
            ellipse.Fill = new RadialGradientBrush(Colors.Black, Color.FromArgb(0, 0, 0, 0));
            this.Children.Add(ellipse);
            Canvas.SetZIndex(ellipse, -100);
            Canvas.SetTop(ellipse, -10);
            Canvas.SetLeft(ellipse, -25);
        }
    }
}
